package beautiful.butterfly.drds.data_exchange.util;

import java.sql.Connection;
import java.sql.SQLException;


public class JdbcCreateConnectionFactory implements CreateConnectionFactory
{


    private String jdbcUrl;

    private String userName;

    private String password;

    public JdbcCreateConnectionFactory(String jdbcUrl, String userName, String password)
    {

        this.jdbcUrl = jdbcUrl;
        this.userName = userName;
        this.password = password;
    }


    public Connection getConnecttion() throws SQLException
    {
        return Jdbc.getConnectionWithRetry(jdbcUrl, userName, password);
    }


    public Connection getConnecttionWithoutRetry()
    {
        return Jdbc.getConnection(jdbcUrl, userName, password);
    }


    public String getConnectionInfo()
    {
        return "jdbcUrl:" + jdbcUrl;
    }
}
